import request from '../utils/request'

export const sendPhoto = (images) => {
    console.log(images)
    console.log(images.value)
        // console.log(typeof(images))



    const a = []
    images.value.forEach(item => {
        // console.log(item)
        a.push(item)
    });
    console.log(a)
        // console.log(typeof(a))
        // const jsonArray = images.map(item => ({
        //     name: item
        // }));
        // const jsonString = JSON.stringify(jsonArray);
        // console.log(jsonString)
        // console.log(jsonString.length)
    return request.post('/group/receive', {
        // images
        a
        // jsonString
    })




}

export const send1Photo = (images) => {
    const a = []
    images.forEach(item => {
        // console.log(item)
        a.push(item)
    });
    console.log(images)
    return request.post('/group/receive', {
        a
    })
}